package com.openlab.action;

import com.openlab.activity.R;

import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;

public class LoginAction {
	private Intent loginIntent;
	private Bundle webServiceParams;
	private String Name1;
	private String Name2;
	
	public LoginAction(SharedPreferences sp, Intent loginIntent, Context context){	
		this.loginIntent=loginIntent;
		Name1 = context.getResources().getString(R.string.paramName1);
		Name2 = context.getResources().getString(R.string.paramName2);
		webServiceParams = new Bundle();

	}
	
	public Intent submit(String userName, String userPwd, Boolean savePwd){	
		webServiceParams.putString("paramName1", Name1);
		webServiceParams.putString("paramValue1", userName);
		webServiceParams.putString("paramName2", Name2);	
		webServiceParams.putString("paramValue2", userPwd);
		loginIntent.putExtra("webServiceParams", webServiceParams);
		loginIntent.putExtra("savePwd", savePwd);
		return loginIntent;
	}
}
